package com.healthtop.dto;

import lombok.Data;

import java.io.Serializable;

/**
 * Created by Peter on 2017/9/12.
 */
@Data
public class BaseDto<T> implements Serializable {

    private String message;

    private int code;

    private boolean isError;

    private T data;

    private int signUpType;

    public BaseDto(){
        message = "ok";
        code = 200;
        isError = false;
    }

    public void failure(int code,String message){
        this.code = code;
        this.message = message;
        this.isError = true;
    }

    public void success(int code,String message){
        this.code = code;
        this.message = message;
        this.isError = false;
    }

}
